class MachineOperator private constructor(val name:String){
    fun checkin() = checkedIn++
    fun checkout() = checkedIn--

    companion object {
        var checkedIn = 0
        fun minBreak() = "150 mins every 2 hours"
        fun create(name:String):MachineOperator{
            val instance = MachineOperator(name)
            instance.checkin()
            return instance
        }
    }
}
val op = MachineOperator.create("test")
println(op.checkin())
println(op.name)